<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>17_正则表达式-边界修饰符</title>
    </head>
    <body>
        <script>
            var reg = /^a/;
            console.log(reg.test('bcd'));
            console.log(reg.test('abcd'));

            var reg = /a$/;
            console.log(reg.test('bcd'));
            console.log(reg.test('bcda'));
        </script>
    </body>
</html>